package no.sachmuld.methodcombination.demo;

import no.sachmuld.methodcombination.api.MethodCombinationSupport;
import no.sachmuld.methodcombination.api.annotation.Inner;
import no.sachmuld.methodcombination.api.annotation.MethodCombinationException;
import no.sachmuld.methodcombination.api.annotation.UsesMethodCombination;

import javax.servlet.*;
import java.io.IOException;

/**
 *
 */
@UsesMethodCombination(FilterBehaviour.class)
public class MethodCombinationFilter extends MethodCombinationSupport<FilterBehaviour> implements Filter {

    @Override
    final public void init(FilterConfig filterConfig) throws ServletException {
        //TODO
    }

    @Override
    final public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        doFilter(request, response);
    }

    @Inner
    final public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException {
        throw new MethodCombinationException();
    }

    @Override
    final public void destroy() {
        //TODO
    }
}
